package com.zimin.cloud.file.controller;

import com.zimin.cloud.file.biz.IFileUploadBiz;
import com.zimin.cloud.file.controller.api.IFileUploadController;
import com.zimin.shared.pojo.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author zimin
 * @since 2021/10/27 5:46 下午
 */
@RestController
@Slf4j
public class FileUploadController implements IFileUploadController {

    @Autowired
    private IFileUploadBiz fileUploadBiz;

    @Override
    public Result uploadImage(MultipartFile file) throws Exception {
        return Result.ok(fileUploadBiz.uploadImage(file));
    }

}
